function debug(msg){
    var log_obj = document.getElementById('debuglog');
    if(!log_obj){
        log_obj = document.createElement("div");
        log_obj.id='debuglog';
        log_obj.innerHTML = '<h1>Debug Log</h1>';
        document.body.appendChild(log_obj);
    }
    var pre = document.createElement('pre');
    var text = document.createTextNode(msg);
    pre.appendChild(text);
    log_obj.appendChild(pre);
}

//通过javascript控制样式来控制元素隐藏
function hide(e,reflow){
    if(reflow){
        e.style.display = 'none';
    }else{
        e.style.visibility = 'hidden';
    }
}
//通过javascript高亮显示
function highlight(e){
    if(!e.className){
        e.className = 'hilite';
    }else{
        e.className +=  "hilite";
    }
}
function demo(){
    var show = 1
}
$(function(){
    jQuery.fn.extend_demo = function(){
        alert(1);
    }
    $("button").extend_demo();
})
